package main

import "fmt"

func main() {
	a := [4]int{0, 1, 2, 3}
	x := a[0:2]
	y := a[0:3]
	fmt.Printf("a = %v, len = %d, cap = %d\n", a, len(a), cap(a))
	fmt.Printf("x = %v, len = %d, cap = %d\n", x, len(x), cap(x))
	fmt.Printf("y = %v, len = %d, cap = %d\n", y, len(y), cap(y))
	a[0] = 9
	fmt.Println()
	fmt.Printf("a = %v, len = %d, cap = %d\n", a, len(a), cap(a))
	fmt.Printf("x = %v, len = %d, cap = %d\n", x, len(x), cap(x))
	fmt.Printf("y = %v, len = %d, cap = %d\n", y, len(y), cap(y))
}
